<?php

namespace App\Http\Controllers;

use App\Library\Requests\Base\SerialNumberRequest;
use App\Library\Requests\BuyWill\BuyWillAddRequest;
use App\Library\Requests\BuyWill\BuyWillEditRequest;
use App\Library\Requests\BuyWill\BuyWillRandRequest;
use App\Library\Service\BuyWillService;
use Illuminate\Http\JsonResponse;

class BuyWillController extends BaseController
{
    public function __construct(BuyWillService $service)
    {
        return $this->service = $service;
    }

    /**
     *
     * @param BuyWillAddRequest $request
     * @return JsonResponse
     *
     */
    public function add(BuyWillAddRequest $request): JsonResponse
    {
        return $this->service->add($request);
    }

    /**
     *
     * @param BuyWillEditRequest $request
     * @return JsonResponse
     *
     */
    public function edit(BuyWillEditRequest $request): JsonResponse
    {
        return $this->service->edit($request);
    }

    /**
     *
     * @param SerialNumberRequest $request
     * @return JsonResponse
     *
     */
    public function delete(SerialNumberRequest $request): JsonResponse
    {
        return $this->service->delete($request);
    }

    /**
     *
     * @param SerialNumberRequest $request
     * @return JsonResponse
     *
     */
    public function transShelfStatus(SerialNumberRequest $request): JsonResponse
    {
        return $this->service->transShelfStatus($request);
    }

    /**
     *
     * @param BuyWillRandRequest $request
     * @return JsonResponse
     */
    public function rand(BuyWillRandRequest $request): JsonResponse
    {
        return $this->service->rand($request);
    }
}
